package com.hex.ds.hdtp.core.app.data.contrast.service;

import com.hex.ds.hdtp.core.app.data.contrast.dto.CrossDbContrastCommonDto;
import com.hex.ds.hdtp.core.app.data.contrast.dto.CrossDbContrastDataSqlDto;
import com.hex.ds.hdtp.core.app.data.contrast.dto.CrossDbContrastResultDto;
import com.hex.ds.hdtp.core.app.data.contrast.dto.CrossDbContrastSampleDataDto;

import java.sql.SQLException;
import java.util.List;

/**
 * @Package com.hex.ds.hdtp.core.app.data.contrast.service
 * @ClassName IContrastSampleDataService
 * @Description 全字段明细比对
 * @Author gj.xu
 * @Date 2024/3/4 17:56
 * @Version v2.0
 **/
public interface IContrastSampleDataService {

    boolean contrastSampleData(CrossDbContrastCommonDto contrastCommon, CrossDbContrastSampleDataDto contrastSampleData, String runLogPkId);

    /**
     * @param contrastCommon
     * @Method contrastAllField
     * @Param
     * @Return java.lang.Boolean
     * @Description 全字段明细对比
     * @Author Wang zhihao
     * @Date 2023/8/18 9:24
     * @Version V1.0
     */
    CrossDbContrastResultDto contrastAllField(String runLogPkId,CrossDbContrastCommonDto contrastCommon, CrossDbContrastSampleDataDto contrastSampleData);

    /**
     * @Method querySqlLimit
     * @Param
     * @Param contrastInfo
     * @Return com.hex.ds.hdtp.core.app.data.contrast.dto.CrossDbContrastDataSqlDto
     * @Description 指定数量 查询sql
     * @Author xin.zhao
     * @Date 2023/10/9 17:30
     * @Version V1.0
     */
    CrossDbContrastDataSqlDto querySqlLimit(CrossDbContrastCommonDto contrastInfo, CrossDbContrastSampleDataDto contrastSampleData, Long offset, Long extractScope);

    /**
     * @Method getAllFieldSqlLimit
     * @Param
     * @Param sourceType
     * @Param contrastType
     * @Param sourceDataInfo
     * @Param targetDataInfo
     * @Param contrastInfo
     * @Param extractScope
     * @Param offset
     * @Return com.hex.ds.hdtp.core.app.data.contrast.dto.CrossDbContrastDataSqlDto
     * @Description 分批比对 sql
     * @Author xin.zhao
     * @Date 2023/10/10 10:36
     * @Version V1.0
     */
    CrossDbContrastDataSqlDto getAllFieldSqlLimit(String sourceType, String contrastType,
                                                  List<String> sourceDataInfo, List<String> targetDataInfo, CrossDbContrastCommonDto contrastInfo, CrossDbContrastSampleDataDto contrastSampleData, Long extractScope, Long offset) throws SQLException;

    /**
     * @Method querySql <br>
     * @Param
     * @Param contrastInfo <br>
     * @Return com.hex.ds.hdtp.core.app.data.contrast.dto.CrossDbContrastDataSqlDto <br>
     * @Description 查询sql<br>
     * @Author jian.qiao<br>
     * @Date 2023/9/26 16:41 <br>
     * @Version V1.0<br>
     */
    CrossDbContrastDataSqlDto querySql(CrossDbContrastCommonDto contrastInfo, CrossDbContrastSampleDataDto crossDbContrastSampleDataDto);

    /**
     * @Method getAllFieldSql <br>
     * @Param sourceType
     * @Param contrastType
     * @Param sourceDataInfo
     * @Param targetDataInfo
     * @Param contrastInfo <br>
     * @Return com.hex.ds.hdtp.core.app.data.contrast.dto.CrossDbContrastDataSqlDto <br>
     * @Description 查询sql<br>
     * @Author jian.qiao<br>
     * @Date 2023/10/8 16:05 <br>
     * @Version V1.0<br>
     */
    CrossDbContrastDataSqlDto getAllFieldSql(String sourceType, String contrastType,
                                             List<String> sourceDataInfo, List<String> targetDataInfo, CrossDbContrastCommonDto contrastInfo, CrossDbContrastSampleDataDto crossDbContrastSampleDataDto) throws SQLException;

}
